﻿$(document).ready(function () {
    var items = $('div.ms-quickLaunch > div > div > div > div > ul > li >:first-child').attr("href", "#").click(function () {
        if ($(this).next().is(":hidden")) {
            items.next().slideUp("fast");
            items.removeClass('open').addClass('close');
            $(this).next().slideDown("fast")
            $(this).removeClass('close').addClass('open');
        }
    });
    items.addClass('close');
    $(".root li.selected").parent().prev().trigger('click');
    $("div.ms-quickLaunch > div > div > div > div > ul > li > ul > li.selected").children().after("<img id='selection_arrow' src='/_layouts/IMAGES/AccordianQuickLaunch/selection.png'></img>");
});